package cn.south.campus.admin.sys.service;

import cn.south.campus.admin.sys.model.entity.SysUser;
import cn.south.campus.admin.sys.model.req.SysUserReq;
import cn.south.campus.admin.sys.model.vo.LoginVO;
import cn.south.campus.admin.sys.model.vo.SysUserVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @author chow
 * @since 2024/10/31
 */
public interface SysUserService extends IService<SysUser> {

    IPage<SysUserVo> sysUserPage(SysUserReq req);


    /**
     * 根据手机号和密码查询用户
     * @param mobile 手机号
     * @param password 密码
     * @return sysUser
     */
    SysUserVo selectByMobileAndPwd(String mobile, String password);

    /**
     * 新增sysUser
     *
     * @param sysUserVo sysUser
     */
    void add(SysUserVo sysUserVo);

    /**
     * 删除用户ID
     *
     * @param id id
     */
    void delete(Long id);

    /**
     * 编辑
     *
     * @param sysUserVo req
     */
    void updateSysUser(SysUserVo sysUserVo);

    /**
     * 详情
     *
     * @param id 用户ID
     * @return sysUser
     */
    SysUserVo detail(Long id);

    /**
     * 根据部门ID查询用户
     *
     * @param id 部门ID
     * @return 用户列表
     */
    List<SysUser> queryByDeptId(Long id);

    void modifyMyInfo(LoginVO vo);
}
